<?php
	header("Content-type:text/html;charset=utf-8");
	$loginId=$_POST["loginId"];
    $loginPwd=$_POST["loginPwd"];
	$conn=mysql_connect("localhost","root","root");
	mysql_select_db("jijia");
	$result1=mysql_query("select * from user where userId='$loginId' and userPwd='$loginPwd'",$conn);
	$result2=mysql_query("select * from user where userId='$loginId'",$conn);
	if(mysql_num_rows($result1)==1){
		echo "1";
	}else if(mysql_num_rows($result2)==1){
		echo "2";
	}	
	if(mysql_num_rows($result2)==0){
		echo "0";
	}
	mysql_close($conn);	
?>
